<?php
/**
 * Author：晴天 QQ：1186258278
 * Creation：2020/3/27 18:26
 * Filename：article.php
 */
if (!defined('IN_CRONLITE')) die();
$USERDATA = login_data::user_data();
$notice_user = notice::user_notice(); #取出通知列表
if ($_QET['act'] == 'notification') {
    notice::user_particulars($_QET['id'], $USERDATA);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html style="<?= background::image() == false ? 'background:linear-gradient(to left, #70e1f5, #ffd194);' : background::image() ?>">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/>
    <title><?= $conf['sitename'] . ($conf['title'] == '' ? '' : ' - ' . $conf['title']) ?></title>
    <meta name="keywords" content="<?= $conf['keywords'] ?>">
    <meta name="description" content="<?= $conf['description'] ?>">
    <link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/AppStore/css/style.css"/>
    <link href="<?= $cdnpublic ?>Swiper/4.5.1/css/swiper.min.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <script src="<?php echo $cdnpublic ?>html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="<?php echo $cdnpublic ?>respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<style>
    body {
        width: 100%;
        max-width: 648px;
        margin: 0 auto;
        color: #666;
        background: #f7f7f7;
        font-size: 12px;
        overflow-x: hidden;
    }
</style>
<body>
<section class="jq22-flexView">
    <header class="jq22-navBar jq22-navBar-fixed">
        <a href="user/" class="jq22-navBar-item" title="进入后台">
            <?= ($USERDATA == false ? '游客' : '<img src="' . $USERDATA['image'] . '" />'); ?>
        </a>
        <div class="jq22-center">
            <div class="jq22-search-box">
                <input type="text" style="text-indent: 0em;padding-left:1em" id="query"
                       onkeydown="if(event.keyCode==13){location.href='./?name='+$('#query').val()}"
                       placeholder="搜索商品内容">
            </div>
        </div>
        <a href="javascript:location.href='./?name='+$('#query').val()" class="jq22-navBar-item">
            <i class="layui-icon layui-icon-search" style="color: #ff5a7c;font-size: 2em"></i>
        </a>
    </header>
    <section class="jq22-scrollView" style="min-height: 90vh">
        <div class="layui-card-body" style="padding: 0em">
            <div class="divHeight"></div>
            <div class="layui-row layui-col-space8" style="padding: 1em">
                <?php foreach ($notice_user['data'] as $v) { ?>
                    <div class="layui-col-xs12">
                        <a href="?mod=article&act=notification&id=<?= $v['id'] ?>">
                            <div class="layui-card" style="box-shadow: 3px 3px 16px #eee;border-radius: 0.5em">
                                <div class="layui-card-header">
                                    <?= $v['title'] ?>
                                </div>
                                <div class="layui-card-body">
                                    发表于：<?= $v['date'] ?>
                                </div>
                            </div>
                        </a>
                        <div class="divHeight"></div>
                    </div>
                <?php } ?>
            </div>
        </div>
        <div style="text-align: center" class="layui-text">
            <p>© <?= $conf['sitename'] ?>. All rights reserved.</p>
            <?= $conf['notice_bottom'] ?>
            <p><?= $conf['statistics'] ?></p>
        </div>
        <div style="height:55px"></div>

    </section>
    <footer class="jq22-footer jq22-footer-fixed" style="width: 100%;max-width: 648px">
        <a href="/" class="jq22-tabBar-item" style="color: red">
                <span class="jq22-tabBar-item-icon">
                    <i class="layui-icon layui-icon-home"></i>
                </span>
            <span class="jq22-tabBar-item-text" style="color: red">首页</span>
        </a>
        <a href="/?mod=class" class="jq22-tabBar-item ">
                <span class="jq22-tabBar-item-icon">
                     <i class="layui-icon layui-icon-app"></i>
                </span>
            <span class="jq22-tabBar-item-text">分类</span>
        </a>
        <a href="/?mod=query" class="jq22-tabBar-item ">
                <span class="jq22-tabBar-item-icon">
                    <i class="layui-icon layui-icon-form"></i>
                </span>
            <span class="jq22-tabBar-item-text">订单</span>
        </a>
        <a href="?mod=cart" class="jq22-tabBar-item ">
                <span class="jq22-tabBar-item-icon">
                    <i class="layui-icon layui-icon-cart"></i>
                </span>
            <span class="jq22-tabBar-item-text">购物车</span>
        </a>
        <a href="user" class="jq22-tabBar-item ">
                <span class="jq22-tabBar-item-icon">
                    <i class="layui-icon layui-icon-user"></i>
                </span>
            <span class="jq22-tabBar-item-text">我的</span>
        </a>
    </footer>

</section>
<script src="<?php echo $cdnpublic ?>jquery/1.12.4/jquery.min.js"></script>
<script src="<?php echo $cdnserver; ?>assets/layui/layui.all.js"></script>
<script src="<?= $cdnpublic ?>Swiper/4.5.1/js/swiper.min.js"></script>